package com.hsgene.common.util.code;

/**
 * @Description: //机构和样本的对外code处理
 * @ProjectName: hdas-geneshop-server
 * @Package: com.hsgene.common.util.code
 * @Author: FX
 * @CreateDate: 2018/12/13 18:00
 * @Version: 1.0
 * Copyright: Copyright (c) 2018
 */
public class CodeCreat {
    private static final String STRING = "1";
    /**
     *code 递增
     * @author FX
     * @date 2018/12/13 18:04
     * @param sampleCode 原code
     * @param symbol 前缀
     * @return
     */
    public   static  String getCode(String sampleCode,String symbol) {
        String sub= STRING +sampleCode.substring(2);
        int tem= Integer.parseInt(sub);
        tem= tem+1;
        return symbol + Integer.toString(tem).substring(1);
    }
}
